/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 卡片容器样式（统一所有页面外层容器） */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* 按钮样式统一 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background-color: #096dd9;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.btn-danger {
    background-color: #ff4d4f;
    color: white;
}

.btn-danger:hover {
    background-color: #d9363e;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* 搜索栏样式统一 */
.search-bar {
    margin: 20px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar input,
.search-bar select {
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-bar input {
    width: 180px;
}

.search-bar select {
    width: 150px;
}

.search-bar input:focus,
.search-bar select:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 表格样式统一 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

th, td {
    border: 1px solid #f0f0f0;
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
}

th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

tbody tr {
    transition: background-color 0.3s ease;
}

tbody tr:hover {
    background-color: #fafafa;
}

/* 模态框样式统一 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    z-index: 1001;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    z-index: 1002;
    display: none;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.confirm-dialog p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

/* 表单样式统一 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: inline-block;
    width: 120px;
    text-align: right;
    margin-right: 15px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 350px;
    padding: 9px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions button {
    margin: 0 15px;
    padding: 9px 20px;
}

/* 状态标签样式 */
.status-success {
    color: #52c41a;
    font-weight: 600;
}

.status-warning {
    color: #faad14;
    font-weight: 600;
}

.status-danger {
    color: #ff4d4f;
    font-weight: 600;
}

/* 角色标签样式 */
.role-admin {
    background: #fff1f0;
    color: #cf1322;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.role-user {
    background: #e6f7ff;
    color: #096dd9;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* 操作链接样式 */
a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card {
        padding: 15px;
        margin: 10px;
    }

    .modal-window {
        width: 90%;
        padding: 20px;
    }

    .form-group label {
        width: 100px;
    }

    .form-group input,
    .form-group select {
        width: calc(100% - 115px);
    }

    .search-bar input {
        width: 140px;
    }

    th, td {
        padding: 8px 4px;
        font-size: 12px;
    }
}
